#pragma once

#include "CommonApps.h"

class SticksProbability
{
public:
	SticksProbability(){};
	inline void init(int totalSticks)
	{
		m_SticksProbability = new float[totalSticks + 1];
		for (int i = 0; i <= totalSticks; ++i)
		{
			m_SticksProbability[i] = getProbabilityStick(i, totalSticks);
		}

	}
	SticksProbability(int totalSticks)
	{
		init(totalSticks);
	}

	inline float getProbability(int stick) const
	{
		return m_SticksProbability[stick];
	}

	~SticksProbability()
	{
		delete[] m_SticksProbability;
	}

private:
	float* m_SticksProbability;

};